<template>
  <div></div>
</template>

<script setup>
import { onMounted } from "vue";
import { HelloRequest } from "@/grpc/greet_pb";
import { GreeterClient } from "@/grpc/greet_grpc_web_pb";

onMounted(() => {
  const client = new GreeterClient("http://localhost:5002/", null, null);

  const request = new HelloRequest();
  request.setName("224");

  client.sayHello(request, {}, (err, response) => {
    console.log("返回", err, response);
  });
});
</script>

<style lang="less" scoped>
.card_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
</style>
